<template>
  <div>
    <div class="center">
        <div class="box" v-for="(v,index) in arr" :key="index">
            <img :src="v.img1">
            <h4>{{v.h1}}</h4>
            <p>{{v.h2}}</p>
            &nbsp;&nbsp; &nbsp;   
            <span>{{v.price}}</span>&nbsp; &nbsp; <del>{{ v.priceold }}</del>
        </div>
    </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
            arr:[]
        }
    },
    mounted() {
        this.$http({
            url:"http://localhost:3000/selected"
        }).then(res => {
            this.arr=res.data[0].data.data1
        })
    }
}
</script>

<style lang="scss" scoped>
.center{
    width: 95vw;
    margin: auto;
    display: flex;
    flex-wrap: wrap;
    .box{
        width: 44vw;
        margin: 2vw 1.7vw;
        height:72vw ;
        background-color: white;
        font-size: 2vw;
        img{
            width: 38vw;
            padding: 2.5vw;
        }
        h4{
            text-indent: 4vw;
            font-weight: normal;
            margin-top: -2vw;
            font-size: 3.5vw;
        }
        p{
            text-indent: 4vw;
            font-size: 2vw;
            margin-top: -2vw;
            color: #8e949d;
        }
        .sss{
            width: 10vw;
            height: 5vw;
            border: 1px solid red;
            border-radius: 1vw;
            font-size: 3vw;
            text-align: center;
            color: red;
            margin-left: 6vw;
            margin-bottom: 3vw;
        }
        span{
            color: red;
            font-size: 5vw;
        }
        del{
            color: #babec3;
        }
    }
}

</style>